package com.kingyea.mobilepolice.user.service;

import com.kingyea.mobilepolice.user.bean.User;
import com.kingyea.mobilepolice.user.bean.UserCondition;

import java.util.List;
import java.util.Map;

/**
 * @author Mr.Lin
 * @version v1.0.0
 * @description User 接口
 * @date Created in 2018-03-30 15:28:59
 */
public interface UserService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    User getById(Integer id) throws Exception;

    /**
     * 通过ID查找对象
     *
     * @param userId
     * @return
     */
    User getByUserId(String userId);

    User getByUserName(String userName);

    /**
     * 列表
     *
     * @param condition
     * @return
     */
    List<User> search(UserCondition condition) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(String id) throws Exception;

    /**
     * 添加
     *
     * @param user
     * @return
     */
    User save(User user) throws Exception;

    /**
     * 更新
     *
     * @param user
     * @return
     */
    User update(User user) throws Exception;

    List<User> list(Map<String, Object> map);

    /**
     * @Description:
     * @Param: [userSerialNo]
     * @return: boolean
     * @Author: cxc
     * @Date: 2018.04.09 14:41
     */
//	boolean delByUserSerialNo(String userSerialNo);
}
